package com.program.facesigninsystem.controller;

import com.program.facesigninsystem.entity.ResponseModel;
import com.program.facesigninsystem.service.ISignInTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author Mapler
 */
@CrossOrigin
@RestController
@RequestMapping(value = "/type")
public class SignInTypeController {
    @Autowired
    public ISignInTypeService iSignInTypeService;
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public ResponseModel selectAll(){
        try {
            List<Map<String,Object>> typeList=iSignInTypeService.selectList();
            return new ResponseModel(200,typeList);
        }catch (Exception e){
            return new ResponseModel(199,"返回失败");
        }
    }
}
